# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=typing
pkgbase=mingw-w64-python2-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python2-${_realname}")
pkgver=3.6.4
pkgrel=1
pkgdesc='Backport of the standard library typing module to Python versions older than 3.6 (mingw-w64)'
url='https://pypi.python.org/pypi/typing'
license=('FSF')
arch=('any')
makedepends=("${MINGW_PACKAGE_PREFIX}-python2"
             "${MINGW_PACKAGE_PREFIX}-python2-setuptools")
depends=("${MINGW_PACKAGE_PREFIX}-python2")
_dtoken="17/75/3698d7992a828ad6d7be99c0a888b75ed173a9280e53dbae67326029b60e"
source=("https://pypi.io/packages/source/t/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('d400a9344254803a2368533e4533a4200d21eb7b6b729c173bc38201a74db3f2')

prepare() {
  cd ${srcdir}
  cp -r ${_realname}-${pkgver} build-python2
}

build() {
  cd ${srcdir}/build-python2
  ${MINGW_PREFIX}/bin/python2 setup.py build
}

package() {
  cd ${srcdir}/build-python2
  MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
  ${MINGW_PREFIX}/bin/python2 setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}"
}
